Power supply switch reference circuitry

ABSTRACT

An apparatus and method for switching between two power supplies, a primary power supply and a secondary power supply. The present invention generates a first reference voltage using the voltage of the primary power supply and the secondary power supply, wherein the primary power supply voltage is variable. The present invention also generates a second reference voltage based on the voltage of the primary power supply. The first and second reference voltages each have a different slope and the crossing point between these two reference voltages indicate that a switch between the primary power supply and the secondary power supply should occur.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to integrated circuits and in particularto MOS integrated circuits. Still more particularly, the presentinvention relates to switch circuitry for switching between powersupplies.

2. Description of the Related Art

In some situations, it is desirable to provide retention of data inintegrated circuits such as memory devices. A number of circuits arecommercially available for retaining data in SRAMS when power isremoved. An example of one such device may be found in U.S. Pat. No.5,099,453, entitled Configuration Memory For Programmable Logic Device,U.S. Pat. No. 4,713,555, entitled Battery Charging Protection Circuit;U.S. Pat. No. 4,122,359, entitled Memory Protection Arrangement; andU.S. Pat. No. 4,451,742, entitled Power Supply Control For IntegratedCircuit. These devices are often known as "zero power circuits".Typically, in a zero power circuit, the contents of the circuit areprotected in the event that the power supply voltage to that circuitdrops below some predetermined or selected threshold voltage i.e., thevoltage of a secondary power supply. This protection may be accomplishedby switching the circuit from a primary power apply to a secondary powersupply, typically an internal battery, when the voltage of the primarypower supply drops below that of the secondary power supply.

Power control circuits exist which provide automatic sensing of aprimary power source voltage. These power control circuits provide forautomatic switching to a secondary power source when the primary powersource voltage drops below a predetermined threshold voltage.

Typically, a comparator is employed to compare the voltage of theexternal power source with the voltage of a predetermined threshold,which is typically the voltage of the battery power supply. When theexternal power supply voltage drops below the voltage of the batterypower supply voltage, the circuit typically switches the integratedcircuit to the battery power supply from the external power supply. Sucha system works well for integrated circuit systems that employ 5.0 voltpower supplies. Problems, however, occur for integrated circuit systemsrunning on power supply voltages at 3.0 volts. In particular, thesepowers supply voltages may range about from 2.7 to about 4.0 volts. As aresult, at various times the external power supply voltage may dropbelow that of the battery supply power voltage. Therefore, it would beadvantageous to have a method and apparatus for switching power suppliesthat does not rely on the voltage of the battery power supply as areference voltage to switch power supplies.

SUMMARY OF THE INVENTION

The present invention provides an apparatus and method for switchingbetween two power supplies, a primary power supply and a secondary powersupply. The present invention generates a first reference voltage usingthe voltage of the primary power supply and the secondary power supply,wherein the primary power supply voltage is variable. The presentinvention also generates a second reference voltage based on the voltageof the primary power supply. The first and second reference voltageseach have a different slope and the crossing point between these tworeference voltages indicate that a switch between the primary powersupply and the secondary power supply should occur.

Typically, the primary power supply is an external power supply to aintegrated circuit, and the secondary power supply is a battery powersupply that is used when the primary power supply voltage drops belowsome pre-selected level. The primary power supply voltage is reconnectedto the integrated circuit when it exceeds the preselected level. Thesepreselected levels are selected by adjusting the crossing point betweenthe first and second reference voltages according to the presentinvention.

The above as well as additional objectives, features, and advantages ofthe present invention will become apparent in the following detailedwritten description.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives and advantages thereof, willbest be understood by reference to the following detailed description ofan illustrative embodiment when read in conjunction with theaccompanying drawings, wherein:

FIG. 1 is a diagram of a integrated circuit system that is powered botha primary and a secondary power supply;

FIG. 2 depicts a circuit for generating control signals known in theart;

FIG. 3 is a circuit for generating control signals;

FIG. 4 depicts a schematic diagram of a circuit for generating signalsfor detecting a switching point according to the present invention;

FIG. 5 is a schematic diagram of a reference circuit implemented in aN-well CMOS process; and

FIGS. 6 and 7 depict graphs of voltages V_(cc1), V_(bat), V_(ref), andV_(a) according to the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT

With reference now to the figures, and in particular with reference toFIG. 1 is a diagram of a integrated circuit system that is powered botha primary and a secondary power supply. Load 10 is connected to eitherpower supply voltage V_(bat) or V_(cc1). Power supply voltage V_(bat) isa fixed power supply voltage while power supply voltage V_(cc1) is avaried power supply voltage. The power supply voltage connected to load10 is controlled by transistors M1 and M2. Load 10 is connected to lowerpower supply voltage V_(ss), which is a power supply voltage having avoltage less than either power supply voltage V_(bat) or V_(cc1). Thegates of transistors M1 and M2 are controlled by control signals CTL andCTL.

Presently, these control signals are generated by the circuit systemshown in FIG. 2. Power supply voltage V_(bat) is employed as a switchingreference point in the prior art. When power supply voltage V_(cc1) isless than power supply voltage V_(bat), the internal power supplyvoltage V_(ccsw) is equal to power supply voltage V_(bat). When powersupply voltage V_(cc1) is greater than power supply voltage V_(bat), theinternal power supply voltage V_(ccsw) is equal to power supply voltageV_(cc1). Comparator 12 generates a control signal CTL in response to acomparison of voltages V_(bat) and V_(cc1) at its input. Control signalCTL is generated by inverter 14. Control signals CTL and CTL arecomplimentarily control signals that are generated at the output of thecomparator. For a 3.0 volt integrated circuit system, the batteryvoltage cannot be used as a switching reference. As a result, differentvoltages are employed to set up the switching point.

According to the present invention, the control signals CTL and CTL forswitching power supplies in the circuit system of FIG. 1 are generatedby the circuit of FIG. 3 by comparator 16 with inputs for voltage V_(a)and V_(ref) according to the present invention. The control signal CTLis generated by inverter 18.

FIG. 4 depicts a schematic diagram of a switching reference circuit forgenerating signals for detecting a switching point. According to thepresent invention, a switching reference circuit 20 is depicted.Switching reference circuit 20 generates signals to used detect aswitching point to switch between power supplies by circuiting such asthe circuit depicted in FIG. 3 according to the present invention.Switching reference circuit 20 includes a start-up circuit 22, a currentsource circuit 24, and a reference circuit 26.

Start-up circuit 22 includes transistors T7-T10. Transistors T7, T8, andT10 are N-channel metal-oxide-semiconductor field effect transistors(MOSFETs) according to the present invention. Transistor T9 is aP-channel MOSFET. The source of transistor T9 is connected to powersupply V_(cc1) while the source of transistor T10 is connected to powersupply voltage V_(ss). Power supply voltage V_(cc1) is higher than powersupply voltage V_(ss). Power supply voltage V_(ss) is typically a groundpower supply voltage. Start-up circuit 22 is employed to start currentflow within current source circuit 24.

Current source circuit 24 includes transistors T1-T6. Transistors T1-T6are MOSFETs according to the preset invention. Current source circuit 24also includes a capacitor C1 and a resistor RS. The current in currentsource circuit 24 is determined by resistor RS. Transistors T1 and T2are P-channel MOSFETs according to the present invention whiletransistors T3-T6 are N-channel MOSFETs according to the presentinvention. Transistors T1 and T2 have sources connected to power supplyvoltage V_(cc1). Capacitor C1 also is connected to power supply voltageV_(cc1). The gates of transistors T1 and T2 are controlled by thecurrent passing through transistor T8 in start-up circuit 22.Transistors T5 and T6 are used to provide a more precise current.

Reference circuit 26 contains transistors T11-T15. Transistors T11, T13,and T14 are N-channel MOSFETs with transistor T12 being a P-channelMOSFET. Transistor T15 is a NPN bipolar transistor according to thepresent invention. The circuit of the present invention in the depictedexample is implemented using a p-well CMOS process. In a N-well CMOSprocess, a PNP bipolar transistor would be employed as depicted in FIG.5. Start-up circuit 22 is connected a power supply voltage V_(cc1) and aground power supply voltage V_(ss). Reference circuit 26 is connected topower supply voltage V_(ccsw) which may be either power supply voltageV_(cc1) or V_(ccbat), which is the battery back up power supply voltage.This connection to power supply voltage V_(ccsw) is made through thecollector of transistor T15. Reference circuit 26 also is connected topower supply voltage V_(cc1) and a lower power supply voltage V_(ss).Transistor T12 is connected to power supply V_(cc1) while transistorsT11, T13, and T14 are connected to power supply voltage V_(ss). Aconnection to power supply voltage V_(ss) is also made through acapacitor C2. The gate of transistor T12 is controlled by the voltageV_(ref) at node V1, which is the voltage drop across transistor T11.Power supply voltage V_(cc1) is the external power supply voltage.Reference circuit 26 also includes resistors RB, R1 and R2. Referencecircuit 26 generates a voltage V_(ref) from node V1, which is thevoltage from node V1 to the lower power supply voltage or ground.Reference circuit 26 also generates a voltage V_(a) at node V2, which isthe voltage drop across capacitor C2 to power supply voltage V_(ss).Voltages V_(ref) and V_(a) are the signals employed to determine when toswitch between two power supplies according to the present invention.The function of switching control circuit is described in more detailbelow.

When power supply voltage V_(cc1) rises, current flows throughtransistor T9 towards node N1, which results in the voltage at node N1to increase. The increase of voltage V_(cc1) causes the currenttraveling through transistors T7 and T9 to increase. The current flowingthrough transistor T7 is equal to the current through transistor T9.Transistor T8 is mirrored to transistor T7, which results in the currentthrough transistor T8 also increasing. The voltage at node N2 drops asthe current through transistors T7-T9 increases. The drop in voltage atnode N2 results in transistors T1 and T2 being turned on allowingcurrent to flow through these two transistors. In response, the voltageat node N3 goes up turning on transistor T10 in start-up circuit 22. Inresponse, transistor TIO pulls the voltage at node N1 down disablingstart up circuit 22. At this time, all of the transistors T1-T6 areworking in a weak inversion region. The current through thesetransistors is low. Capacitor C1 is added to hold the voltage low atnode N2 for a short period of time to allow current source circuit 24sufficient time to generate current. Current source circuit 24 isemployed to generate the current for creating voltages V_(ref) and V_(a)based on power supply voltage V_(cc1).

Capacitor C2 is employed to respond to frequency changes. Thus, if noiseoccurs from the power supply, V_(ref) and V_(a) should follow eachother.

Voltage V_(ref) at node V1 is temperature independent and is aboutV_(cc1) -0.5 V initially and then settles to a stable value after thecurrent source is stabilized. This value for V_(ref) is calculated asfollows: ##EQU1## where V_(BE) is the base emitter voltage of transistorT15; K is the ratio of the current mirror T3 and T11, S_(i) is thedevice size (W/L)i for i=1, 2, 3, and 4 S₁ is the device size of thefirst transistor (T₁) in current source 24, S₂ is the device size of thesecond transistor (T₂) in current source 24, S₃ is the device size ofthe third transistor (T₃) in current source 24, S₄ is a device size ofthe fourth transistor (T₄) in current source 24, kT/q is the thermalvoltage. The voltage V_(ref) controls transistor T12 with node N5 beingpulled to ground. The voltage V_(a) is switched from V_(cc1) toR2/(R1+R2) V_(cc1).

With reference to FIGS. 6 and 7, graphs of voltages V_(cc1), V_(bat),V_(ref), and V_(a) are depicted according to the present invention. Inthese two graphs, the X-axis is time in milliseconds and the Y-axis isvoltage. Crossing point 30 is the point at which the load or circuitryis switched from the battery power supply to the primary power supply.Crossing point 32 is the point at which the load or circuit is switchedfrom the primary power supply to the battery power supply. VoltageV_(ref) is based on voltages V_(cc1) and V_(ccsw) as can be seen withreference back to FIG. 4 and equation 1. As can be seen, when voltageV_(ref) is greater than V_(a), the power supply is switched from V_(bat)to V_(cc1). The resistor ratio R2/(R1+R2) determines the crossing point,the point at which V_(a) and V_(ref) cross each other, for switchingbetween power supplies. The voltage V_(ref) always follows V_(cc1). Inother words, V_(ref) has the same slope as V_(cc1). Voltage V_(a) has adifferent slope from V_(ref). The slope of voltage V_(a) is determinedby resistors R1 and R2 in FIG. 4. After crossing point 30, voltageV_(ref) is based only on voltage V_(cc1) without any influence fromvoltage V_(bat) because at that point, the power supply voltage V_(ccsw)has been switched from the battery power supply generating voltageV_(bat) to power supply voltage generating voltage V_(cc1). The powersupply voltage V_(ccsw) is switched back to V_(bat) after time T3.

In the depicted example, the battery voltage V_(bat) is 3.5 volts andthe crossing points 30 and 32, the voltage at which V_(a) and V_(ref)cross has been set to 2.3 volts. The crossing point may be altered bychanging values for resistors R1 and R2 in FIG. 4. Also, the batterycurrent I_(bat) is used by the switching reference circuit only betweentimes T1 and T2 and T3 and T4. At other points in the graph in FIG. 6,the current I_(bat) in the switching reference circuit is equal to 0.

One advantage of the present invention is that the switching circuit maybe employed for any type of V_(cc) part with requiring only a smallbattery current during a short switching period. The present inventionalso provides an advantage of allowing different reference points to beset for switching between power supplies. The present invention may beimplemented for integrated circuit parts using various power supplyvoltages, such as 5.0 and 3.3 volts. The present invention provides lowbattery currents during switching periods, which is defined as the timebetween the starting of the circuitry and the crossing point toswitching power supplies. As a result, under the present invention,battery life is not affected by the switching reference circuit.

The present invention is depicted using MOS technology. Other types oftechnology in transistors may be used according to the presentinvention.

While the invention has been particularly shown and described withreference to a preferred embodiment, it will be understood by thoseskilled in the art that various changes in form and detail may be madetherein without departing from the spirit and scope of the invention.

What is claimed is:
 1. A power supply switching circuit for switchingpower supplies to a load, the power supply switching circuitcomprising:a switching circuit connected to two power supplies supplyingtwo voltages, a primary power supply and a secondary power supply, theprimary power supply providing a first voltage and the secondary powersupply providing a second voltage, the first voltage being a variablevoltage wherein the switching circuit is controlled by a control signal,the control signal causing one of the two power supplies to be connectedto the load, wherein one of the two voltages is connected to the load; areference circuit including:means for generating a first referencevoltage utilizing the first voltage and a switched voltage, the switchedvoltage being switched between the first voltage and the second voltage,wherein the first voltage reference has a first slope; and means forgenerating a second reference voltage utilizing the first voltage,wherein the second reference voltage has a second slope that is selectedto provide a crossing point with the first reference voltage, whereinthe switching circuit switches between the two power supplies inresponse to an occurrence of a crossing point between the firstreference voltage and the second reference voltage.
 2. The power supplyswitching circuit of claim 1, wherein both the first reference voltageand the second reference voltage are lower than the secondary powersupply voltage.
 3. The power supply switching circuit of claim 2,wherein the secondary power supply is a battery power supply.
 4. Thepower supply switching circuit of claim 1, wherein both the first andsecond reference voltages are less than the first voltage.
 5. The powersupply switching circuit of claim 1, wherein the slope of the secondreference voltage is selected as follows: ##EQU2## wherein R₁ and R₂ areresistor values.
 6. The power supply switching circuit of claim 2,wherein the secondary power supply voltage is greater than the primarypower supply voltage.
 7. A power supply switching circuit for switchingpower supplies to a load, the power supply switching circuitcomprising:a switching circuit connected to two power supplies supplyingtwo voltages, a primary power supply and a secondary power supply,wherein the primary power supply generates a first voltage and thesecondary power supply generates a second voltage, wherein the switchingcircuit is controlled by control signal, the control signal causing oneof the two power supplies to be connected to the load, wherein one ofthe two voltages is connected to the load; a comparator circuit having afirst input connected to a first input reference voltage, a second inputconnected to a second reference voltage, and an output, connected to theswitching circuit, wherein the control signal is generated at theoutput; a reference voltage circuit including:a first circuit comprisinga first transistor having a base, a collector, and an emitter, thecollector being having a connection that is switched between the firstvoltage and the second voltage in response to the switching circuitconnecting one of the two power supplies to the load, a secondtransistor having a gate, a source, and a drain, and a resistor, havinga first end and a second end wherein the drain of the second transistoris connected to the first end of the resistor and the second end of theresistor is connected to the emitter of the first transistor, whereinthe first reference voltage is equal to voltage drop across the secondtransistor, wherein the drain of the second transistor is connected tothe first input of the comparator circuit; and a second circuitcomprising a first resistor and a second resistor connected in series,wherein the first resistor has a first end connected to the firstvoltage and a second end connected to a first end of the secondresistor, wherein the second reference voltage is equal to a voltagedrop across the second resistor and wherein the first end of the secondtransistor is connected to the second input of the comparator circuit.8. The power supply switching circuit of claim 7, further comprising acurrent source including:a first transistor and a second transistor,each transistor having a source, a drain, and a gate, the sources of thefirst transistor and the second transistor being connected to the firstvoltage, the gate of the first transistor and the second transistorbeing connected to the drain of the second transistor; a thirdtransistor and a fourth transistor, each transistor having a source, adrain, and a gate, the drain of the third transistor being connected tothe drain of the first transistor, the drain of the fourth transistorbeing connected to the drain of the second transistor, and the gates ofthe third transistor and the fourth transistor being connected to thedrain of the third transistor; and a fifth transistor and a sixthtransistor, each transistor having a source, a drain, and a gate, thedrain of the fifth transistor being connected to the source of the thirdtransistor, the drain of the sixth transistor being connected to thesource of the fourth transistor, the sources of the fifth transistor andthe sixth transistor being connected to a lower power supply voltage,and the gates of the fifth transistor and the sixth transistor beingconnected to the drain of the fifth transistor, wherein the gate of thefifth transistor in the current source is connected to a gate of thesecond transistor in the reference circuit and wherein the source of thesixth transistor is connected to the lower power supply by a resistorhaving a first end connected to the source of the sixth transistor and asecond end connected to the lower power supply voltage.
 9. The powersupply switching circuit of claim 7, wherein in the second circuit, thesecond end of the second resistor is connected to the lower power supplyvoltage by a transistor having a drain connected to the second end ofthe resistor and a source connected to the lower power supply voltage,wherein the transistor has a gate controlled by the first referencevoltage.
 10. The power supply switching circuit of claim 7, wherein thefirst transistor is a PNP transistor.
 11. The power supply switchingcircuit of claim 7, wherein the first transistor is an NPN transistor.12. The power supply switching circuit of claim 10, wherein the secondtransistor is an N-channel MOSFET.
 13. The power supply switchingcircuit of claim 9, further comprising a current source including afirst transistor, a second transistor, a third transistor, and a fourthtransistor, wherein the first reference voltage is generated asfollowings: ##EQU3## wherein V_(ref) is the first reference voltage,V_(cc1) is the first voltage, V_(BE) is a base emitter voltage of thefirst transistor in the first circuit, S₁ is the device size of thefirst transistor in the current source, S₂ is the device size of thesecond transistor in the current source, S₃ is the device size of thethird transistor in the current source, S₄ is a device size of thefourth transistor in the current source, kT/q is the thermal voltage, Rbis the resistor in the first circuit, and Rs is the resistor in thecurrent source.
 14. The power supply switching circuit of claim 7,further comprising:a current source including:a first transistor and asecond transistor, each transistor having a source, a drain, and a gate,the sources of the first transistor and the second transistor beingconnected to the first voltage and the gate of the first transistor andthe second transistor being connected to the drain of the secondtransistor; and a third transistor and a fourth transistor, eachtransistor having a source, a drain, and a gate, the drain of the thirdtransistor being connected to the drain of the first transistor, thedrain of the fourth transistor being connected to the drain of thesecond transistor, the sources of the third transistor and the fourthtransistor being connected to the lower power supply, and the gates ofthe third transistor and the fourth transistor being connected to thedrain of the third transistor; wherein the gate of the third transistorin the current source is connected to a gate of the second transistor inthe reference circuit.
 15. The power supply switching circuit of claim14, wherein in the second circuit, the second end of the second resistoris connected to the lower power supply voltage by a transistor having adrain connected to the second end of the resistor and a source connectedto the lower power supply voltage, the transistor having a gatecontrolled by the reference voltage.
 16. The power supply switchingcircuit of claim 15, wherein the first reference voltage is determinedas follows: ##EQU4## wherein V_(ref) is the first reference voltage,V_(cc1) is the first voltage, V_(BE) is a base emitter voltage of thefirst transistor in the first circuit, S₁ is the device size of thefirst transistor in the current source, S₂ is the device size of thesecond transistor in the current source, S₃ is the device size of thethird transistor in the current source, S₄ is a device size of thefourth transistor in the current source, kT/q is the thermal voltage, Rbis the resistor in the first circuit, and Rs is the resistor in thecurrent source.
 17. The power supply switching circuit of claim 16,wherein the second reference voltage is determined as follows: ##EQU5##wherein V_(a) is the second reference voltage, R1 is a resistor value ofthe first resistor in the second circuit, R2 is a resistor value of thesecond resistor in the second circuit, and V_(cc) is the first voltage.18. A power supply switching circuit for switching power supplies to aload, the method comprising:a switching circuit connected to two powersupplies, a primary power supply and a secondary power supply, whereinthe switching circuit causes one of the two power supplies to beconnected to the load; a circuit including:generating means forgenerating a first reference voltage utilizing the first voltage and aswitched voltage, the switched voltage being switched between the firstvoltage and the second voltage, wherein the first voltage reference hasa first slope; and generating means for generating a second referencevoltage utilizing the first voltage, wherein the second referencevoltage has a second slope that is selected to provide a crossing pointwith the first reference voltage, wherein the switching means forswitching circuits switches between the two power supplies in responseto an occurrence of a crossing point between the first reference voltageand the second reference voltage.
 19. A method for switching between aprimary power supply and a secondary power supply, wherein the primarypower supply voltage provides a first voltage and the secondary powersupply voltage provides a second voltage, the methodcomprising:generating a first reference voltage utilizing the firstvoltage and a switched voltage, the switched voltage being switchedbetween the first voltage and the second voltage, wherein the firstreference voltage has a first slope; generating a second referencevoltage utilizing the first voltage, wherein the second referencevoltage has a second slope, wherein the second slope is selected toprovide a crossing point with the first reference voltage; and switchingbetween the primary and secondary power supplies in response to anoccurrence of the crossing point between the first reference voltage andthe second reference voltage.